<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Component 初识组件</title>
    <script src="../assets/js/vue.js"></script>
</head>
<body>
    <h1>Component 初识组件</h1>
    <hr>
    <div id="app">
        <!-- 全局注册组件 -->
       <!-- <lifeng></lifeng> -->

       <!-- 局部注册组件 -->
       <lifeng></lifeng>
    </div>
</body>
<script>
    // Vue.component("lifeng",{
    //     template:`
    //         <h1>全局化注册component</h1>
    //     `
    // })
    var app = new Vue({
        el:"#app",
        data:{ 
            message:"helloworld"
        },
        components: {
            "lifeng":{
                template:`
                    <h1>局部注册的标签</h1>
                `
            }
        }
    })
</script>
</html>